package com.example.shuiyin.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TaskStatusResult {
    private String taskId;
    private String status;
    private int progress;
    private String message;
    
    // 从内部类型转换
    public static TaskStatusResult fromInternal(com.example.shuiyin.dto.watermark.TaskStatusResult internal) {
        if (internal == null) {
            return null;
        }
        return TaskStatusResult.builder()
                .taskId(internal.getTaskId())
                .status(internal.getStatus())
                .progress(internal.getProgress())
                .message(internal.getErrorMessage())
                .build();
    }
} 